<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    /* 
    1.用户输入班级各学生的成绩
    2.编写一个函数，返回该班级总分，平均分，最高分，最低分，不及格人数，
    */


    /*  // ********** 画星，自定义数量，和符号
     function draw(num, fu) {
          let star = '';
          for (let i = 1; i <= num; i++) {
            //5 5/2 2.5
            star += fu;
            // console.log(star);
          }
    
    
          return star;
    
        }
        console.log(draw(5, '#'));
    
        for (let i = 1; i < 19; i++) {
          if (i % 2 === 1) {
            let kong = (19 - i) / 2;
            console.log(draw(kong, '  ') + draw(i, '☆'));
          }  
    
        }
        for (let i = 19; i >=1; i--) {
          if (i % 2 === 1) {
            let kong = (19 - i) / 2;
            console.log(draw(kong, '  ') + draw(i, '☆'));
          }  
    
        } */
  </script>
</body>

</html>